/*
Copyright 2007 Julian Asamer

This file is part of Fractalicious.

    Fractalicious is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Fractalicious is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Fractalicious.  If not, see <http://www.gnu.org/licenses/>.
*/


/*
	This is the heart of the Fractalicious Programm.
	
	It creates the fractals, the algorithm, allocates the data storage, and creates the F(ractal)View.
*/

#import <CoreFoundation/CoreFoundation.h>
#import <Foundation/Foundation.h>
#import <UIKit/CDStructures.h>
#import <UIKit/UIPushButton.h>
#import <UIKit/UIThreePartButton.h>
#import <UIKit/UINavigationBar.h>
#import <UIKit/UIWindow.h>
#import <UIKit/UIView-Hierarchy.h>
#import <UIKit/UIHardware.h>
#import <UIKit/UITable.h>
#import <UIKit/UITableCell.h>
#import <UIKit/UITableColumn.h>
#import "FView.h"
#import "FOptions.h"
#import "FAlgorithm.h"
#import "DrawingData.h"

@class FractalDescription;
enum RecalcType;

@interface FractalController : NSObject 

{
	FView *fractalView;
	FAlgorithm *c;
	UIView *fractalFrame;
	UINavigationBar *bottomNav;
	FOptions *optionsTable;
	//DrawingData *data;
	DrawableFractal *data;
	id fractal;
}
	+(FractalController *)sharedInstance;
	-(id)init;
	
	-(UIView *)getView;
	- (id)init;
	- (void)setFractal:(FractalDescription *) d;
	
	- (NSMutableArray *) getDragables;
	- (void)backFromFOptions;
	- (void)calculationFinished:(DrawableFractal *)df;
	- (void)viewChanged:(NSAffineTransform *)t;
	- (void)toggleBars;
	- (void)showBars;
	- (void)hideBars;
	- (void)startRecalculation: (RecalcType) type;

@end